package com.cds.controller;

import com.cds.domain.Student;
import com.cds.domain.Student1;
import com.cds.service.Student1Service;
import com.cds.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired
    private StudentService studentService;
    @Autowired
    private Student1Service student1Service;

    @GetMapping("findStudent")
    public String findStudent(){
        Student student = studentService.getById(1);
        System.out.println(student);
        Student1 byId = student1Service.getById(1);
        System.out.println(byId);
        return "成功";
    }

}
